package com.ubireality.module.patronus;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToOne;

import com.ubireality.module.basic.BaseEntity;

@Entity
public class Patron extends BaseEntity {
	private String givenName;
	private int age;
	private int happness;
	@Column(nullable = false, columnDefinition = "TINYINT(1)")
	// we got problem when use bit(1) by default
	private boolean isLock;// being abandon or not； we should not use the word
							// 'lock', its a key word in mysql
	@OneToOne
	private PatronSpecies species;// the characters and generation
	@OneToOne
	private PatronEffects effects;

	public String getGivenName() {
		return givenName;
	}

	public void setGivenName(String givenName) {
		this.givenName = givenName;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public int getHappness() {
		return happness;
	}

	public void setHappness(int happness) {
		this.happness = happness;
	}

	public PatronSpecies getSpecies() {
		return species;
	}

	public void setSpecies(PatronSpecies species) {
		this.species = species;
	}

	public PatronEffects getEffects() {
		return effects;
	}

	public void setEffects(PatronEffects effects) {
		this.effects = effects;
	}

	public boolean isLock() {
		return isLock;
	}

	public void setLock(boolean isLock) {
		this.isLock = isLock;
	}

}
